﻿using ASmile.Com;
using ASmile.DBModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ASmile.Win.DaBLL
{
    class CfgDictBLL : BLLBase, ICfgDictBLL
    {
        protected override string ControllerName => "SysManage/CfgDict";

        /// <summary>
        /// 获取字典列表
        /// {"cfgType":"配置类型"}
        /// </summary>
        public ApiResultList<Cfg_Dict> GetCfgDicts(string cfgType)
        {
            return GetResultList<Cfg_Dict>(new { cfgType });
        }
        /// <summary>
        /// 获取字典类型列表
        /// </summary>
        public ApiResultList<Cfg_DictType> GetCfgDictType()
        {
            return GetResultList<Cfg_DictType>(null);
        }
        /// <summary>
        /// 保存配置
        /// </summary>
        public ApiResult<string> SaveCfgValue(Cfg_Dict model)
        {
            return GetResult<string>(model);
        }
    }
}